package com.sun.wanandroid.ui.splash

import androidx.compose.runtime.Composable
import androidx.lifecycle.viewmodel.compose.viewModel

/**
 *@author:sunc
 *@time :2025/7/25 8:59
 *@desc: 描述
 */
interface ISplashComposableTask {

    val content: @Composable (viewModel: SplashViewModel) -> Unit

    val index: Int

    @Composable
    fun SplashComposableItem() {
        val viewModel: SplashViewModel = viewModel()
        if (viewModel.mCurrentTaskIndex.intValue == index) {
            content.invoke(viewModel)
        }
    }
}